import http.client as hc
server=hc.HTTPSConnection("www.baidu.com")
server.request('GET','/')
a=server.getresponse()
print(a.status,a.reason)
'''
200 OK
'''